home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung 2 / Power-Programmierung CD 2 (Tewi)(1994).iso / c / library / bcfamily / source / move.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1993-06-12  |  741 b   |  31 lines

  1. //
  2. //      *******************************************************************
  3. //        JdeBP C++ Library Routines          General Public Licence v1.00
  4. //            Copyright (c) 1991,1992     Jonathan de Boyne Pollard
  5. //      *******************************************************************
  6. //
  7. // Part of FamAPI.LIB
  8. //
  9.  
  10. #include "famapi.h"
  11. #include "dosdos.h"
  12.  
  13. //
  14. //    Move a file within the namespace
  15. //
  16. USHORT _APICALL
  17. DosMove        ( const char far *OldName,
  18.               const char far *NewName,
  19.               unsigned long Reserved )
  20. {
  21.     asm push ds ;
  22.     _DS = FP_SEG(OldName) ;
  23.     _DX = FP_OFF(OldName) ;
  24.     _ES = FP_SEG(NewName) ;
  25.     _DI = FP_OFF(NewName) ;
  26.     _AH = 0x56 ;
  27.     Dos3Call() ;
  28.     asm pop ds ;
  29.     if (_FLAGS & 0x0001) return _AX ; else return NO_ERROR ;
  30. }
  31.